feat(pnpm): add rtk pnpm [run] <script> with smart filter routing#232
feat(pnpm): add rtk pnpm [run] <script> with smart filter routing#232denneulin wants to merge 1 commit intortk-ai:masterfrom
rtk pnpm [run] <script> with smart filter routing#232Conversation
Route pnpm scripts to specialized filters (vitest, tsc, eslint, prettier, playwright) via static name matching and package.json auto-detection. Supports both `rtk pnpm run test` and `rtk pnpm test` shorthand. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Review: PR #232Thanks for this PR — great initiative! The two-tier routing design (static name matching + package.json detection) is clean and the Local test results (14 commands)
Comparison — The main selling point of this PR (smart routing to vitest/playwright filters) doesn't work in practice. Bugs to fix1. Vitest/Playwright filter routing is broken
Fix: Apply 2. Reproduced: added
Fix: Add a denylist of known pnpm native subcommands ( 3.
Fix: On non-zero exit, don't apply the boilerplate filter — show the raw error output. Other items
What works well
Thanks for the solid work — keep it up! Happy to re-review once the vitest routing and subcommand interception are fixed. |
Summary
rtk pnpm run <script>andrtk pnpm <script>shorthand with smart routing to specialized filterspackage.json auto-detection for custom scripts (e.g.,
test:e2e→ detectsplaywright test→PlaywrightParser)
filter_tsc_output,filter_generic_lint,extract_test_summarytopub(crate)for cross-modulereuse
Token Savings
pnpm [run] test(vitest)pnpm [run] typecheck(tsc)pnpm [run] lint(eslint)pnpm [run] prettier --checkpnpm [run] test:e2e(playwright)pnpm [run] build(unrouted)How It Works
rtk pnpm run test→PnpmCommands::Run→run_script("test")→ boilerplate strip → TestRunner filterrtk pnpm test→PnpmCommands::Other→is_pnpm_script("test")→run_script("test")rtk pnpm test:e2e→ readspackage.json→ detectsplaywright test→ PlaywrightParserrtk pnpm store prune→is_pnpm_script("store")= false → passthroughTest plan
apply_filter labels, integration, is_pnpm_script)
cargo fmt --all && cargo clippy --all-targets && cargo test --all— 437 tests passrtk pnpm run test,rtk pnpm test,rtk pnpm run lint